package br.com.statizo.financeiro.repository.impl;

import java.util.List;

import javax.persistence.Query;

import br.com.snoghert.persistence.repository.impl.SAbstractRepository;
import br.com.statizo.financeiro.entity.TipoLancamento;
import br.com.statizo.financeiro.repository.RepositorioTipoLancamento;

public class RepositorioTipoLancamentoImpl extends SAbstractRepository<TipoLancamento> implements RepositorioTipoLancamento{

	private static final long serialVersionUID = 1L;

	public RepositorioTipoLancamentoImpl() throws ClassNotFoundException {
		super();
	}

	@Override
	public List<TipoLancamento> getList(boolean somenteAtivos) {

		if(!somenteAtivos){
			return getList();
		}
		
		Query query = entityManager.createQuery("From TipoLancamento Where inativo = false Order By descricao");
		return query.getResultList();

	}

	
}
